Class 6 Exam  >  Class 6 Questions  >  Find the output of the following program.#inc... Start Learning for Free
Find the output of the following program.
#include<stdio.h>
void main()
{
   int y=10;
   if(y++>9 && y++!=10 && y++>11)
      printf("%d", y);
   else
      printf("%d", y);
}
  • a)
    11
  • b)
    12
  • c)
    13
  • d)
    14
Correct answer is option 'C'. Can you explain this answer?
Most Upvoted Answer
Find the output of the following program.#include<stdio.h>void m...
Here if Statement is true and if statement executes left to right. Since its AND operator so all the condition should be check until it finds any false statement. Initially y = 10 In 1st condition: y++>9 which is true and y become 11 in next use. In 2nd condition: y++!=10 which is also true and y become 12 in next use In 3rd condition: y++>11 which is also true and y become 13 in next use After that printf statement will execute and print y = 13
Explore Courses for Class 6 exam
Question Description
Find the output of the following program.#include<stdio.h>void main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);}a)11b)12c)13d)14Correct answer is option 'C'. Can you explain this answer? for Class 6 2025 is part of Class 6 preparation. The Question and answers have been prepared according to the Class 6 exam syllabus. Information about Find the output of the following program.#include<stdio.h>void main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);}a)11b)12c)13d)14Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for Class 6 2025 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Find the output of the following program.#include<stdio.h>void main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);}a)11b)12c)13d)14Correct answer is option 'C'. Can you explain this answer?.
Solutions for Find the output of the following program.#include<stdio.h>void main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);}a)11b)12c)13d)14Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for Class 6. Download more important topics, notes, lectures and mock test series for Class 6 Exam by signing up for free.
Here you can find the meaning of Find the output of the following program.#include<stdio.h>void main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);}a)11b)12c)13d)14Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Find the output of the following program.#include<stdio.h>void main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);}a)11b)12c)13d)14Correct answer is option 'C'. Can you explain this answer?, a detailed solution for Find the output of the following program.#include<stdio.h>void main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);}a)11b)12c)13d)14Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of Find the output of the following program.#include<stdio.h>void main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);}a)11b)12c)13d)14Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Find the output of the following program.#include<stdio.h>void main(){ int y=10; if(y++>9 && y++!=10 && y++>11) printf("%d", y); else printf("%d", y);}a)11b)12c)13d)14Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice Class 6 tests.
Explore Courses for Class 6 exam
Signup to solve all Doubts
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev